<?php

/**
 * This is the model metadata class for table "web_message".
 */
class WebMessageMetadata extends CARMDC
{
	/**
	 * @return string the associated database table name
	 */
	public function tableName()
	{
		return 'web_message';
	}

	/**
	 * @return array validation rules for model attributes.
	 */
	public function rules()
	{
		// NOTE: you should only define rules for those attributes that
		// will receive user inputs.
		return array(
			array('uid, relate_id, web_id', 'numerical', 'integerOnly'=>true),
			array('short_title, worker_id', 'length', 'max'=>20),
			array('title', 'length', 'max'=>100),
			array('thumb', 'length', 'max'=>255),
			array('worker_type', 'length', 'max'=>50),
			array('create_time, update_time', 'safe'),
			// The following rule is used by search().
			// Please remove those attributes that should not be searched.
			array('id, short_title, title, thumb, create_time, uid, relate_id, web_id, update_time, worker_id, worker_type', 'safe', 'on'=>'search'),
		);
	}

	/**
	 * @return array relational rules.
	 */
	public function relations()
	{
		// NOTE: you may need to adjust the relation name and the related
		// class name for the relations automatically generated below.
		return array(
		);
	}

	/**
	 * @return array customized attribute labels (name=>label)
	 */
	public function attributeLabels()
	{
		return array(
			'id' => 'ID',
			'short_title' => 'Short Title',
			'title' => 'Title',
			'thumb' => 'Thumb',
			'create_time' => 'Create Time',
			'uid' => '用户',
			'relate_id' => '回复id',
			'web_id' => '所属网站',
			'update_time' => 'Update Time',
			'worker_id' => 'Worker',
			'worker_type' => '用户类型',
		);
	}
}